package com.liu.domain;

import javax.persistence.*;
import java.util.Date;

/**
 * Created by liu on 17-10-27.
 */
@Entity
@Table(name = "VoteTopic")
public class VoteTopic {
    @Id
    private int id;
    private String title;        //主题
    private String descript;           //描述
    @Temporal(TemporalType.DATE)         //开始日期
    private Date startTime = new Date();
    @Temporal(TemporalType.DATE)            //截止日期
    private Date stopTime = new Date();
    private String state;              //状态开关  可以控制投票开始停止

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getDescript() {
        return descript;
    }

    public void setDescript(String descript) {
        this.descript = descript;
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getStopTime() {
        return stopTime;
    }

    public void setStopTime(Date stopTime) {
        this.stopTime = stopTime;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    @Override
    public String toString() {
        return "VoteTopic{" +
                "id=" + id +
                ", title='" + title + '\'' +
                ", descript='" + descript + '\'' +
                ", startTime=" + startTime +
                ", stopTime=" + stopTime +
                ", state='" + state + '\'' +
                '}';
    }
}
